#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QReadWriteLock>
#include "readthread.h"
#include "writethread.h"
#include <vector>


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_btnRead_clicked();

    void on_btnWriteNotRead_clicked();

    void on_btnReadNotWrite_clicked();

    void on_btnWrite_clicked();

    void on_btnStop_clicked();

private:
    Ui::Widget *ui;
    QReadWriteLock readWriteLock;
    std::vector<ReadThread*> readThreadVector;
    std::vector<WriteThread*> writeThreadVector;




};
#endif // WIDGET_H
